package com.baizhi.controller;


import com.baizhi.entity.BzLog;
import com.baizhi.service.IBzLogService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xhc
 * @since 2020-09-25
 */
@RestController
@RequestMapping("log")
public class BzLogController {

    @Resource
    private IBzLogService  bzLogService;

    @RequestMapping("selectAll")
    public Map selectAll(String username, Integer page,Integer limit){
        Page<BzLog> bzLogPage = bzLogService.selectAll(username, page, limit);
        Map map=new HashMap();
        map.put("code","0");
        map.put("msg","0");
        map.put("count",bzLogPage.getTotal());
        map.put("data",bzLogPage.getRecords());
        return map;
    }


}
